package com.neusoft.bizcore.auth.common.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class UserBean implements Serializable {

    private static final long serialVersionUID = 1L;

    private long userId;
    private String username;
    private String name;
    private String password;
    private boolean accountNonExpired;
    private boolean accountNonLocked;
    private boolean credentialsNonExpired;
    private boolean enabled;
    private List<RoleBean> roles = new ArrayList<>();
    private PermissionBean permissions;
    private List<String> orgs = new ArrayList<>();

    public UserBean() {
    }

    public UserBean(long userId, final String username, final String name, final String password,
            final List<RoleBean> roles,
            final PermissionBean permissions, final Set<String> orgs) {
        this.userId = userId;
        this.username = username;
        this.name = name;
        this.password = password;
        this.roles.addAll(roles);
        this.permissions = permissions;
        this.orgs.addAll(orgs);
    }

}
